package helper;

import java.util.ArrayList;
import java.util.List;
import java.util.Vector;

import javax.swing.table.DefaultTableModel;

public class TableModelHelper extends DefaultTableModel {
	
	private static final long serialVersionUID = -5557719812574461545L;
	
	private List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
	
	public TableModelHelper(List<ColumnConfig> columns) {
		this.columns = columns;
	}
	
	@Override
	public boolean isCellEditable(int row, int column) {
		return columns.get(column).isEditable();
	}
	
	public List<ColumnConfig> getColumns() {
		return columns;
	}
	public void setColumns(Vector<ColumnConfig> columns) {
		this.columns = columns;
	}
	
}
